package rainclass.shijuan2.scanner;

import java.io.FilterOutputStream;
import java.util.Objects;
import java.util.Scanner;
import java.util.regex.Matcher;
import java.util.regex.Pattern;

public class ScannerTest {
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        Pattern pattern = Pattern.compile("\\d?");
        int sum = 0;
        int times = 0;
        while (true){
            String string = scanner.nextLine();
            if (!string.equals("")){
                string = string.replaceAll("\\D","");
                if (!string.equals("")) {
                    sum = sum + Integer.parseInt(string);
                    times++;
                }
            }
            else {
                break;
            }
        }

        System.out.println(sum/times);



    }
}
